module.exports = {
    ToCo: function(query_instance, method, args) {
        if (!Array.isArray(args)) {
            args = []
        }
        args.push({
            success: resolve,
            error: reject
        });
        return new Promise(function(resolve, reject) {
            query_instance[method].apply(query_instance, args);
        });
    }
};
